#ifndef COLOUR_H
#define COLOUR_H

struct Colour
{
	Colour();
	Colour(float red, float green, float blue, float alpha);

	void SetColour(float red, float green, float blue, float alpha);
	float Brightness();
	Colour Scalar(float scalar);

	Colour operator+= (const Colour& rhs)
	{
		r += rhs.r;
		g += rhs.g;
		b += rhs.b;
		a += rhs.a;

		return *this;
	}

	Colour operator+ (const Colour& rhs)
	{
		r += rhs.r;
		g += rhs.g;
		b += rhs.b;
		a += rhs.a;

		return *this;
	}

	Colour operator*= (const Colour& rhs)
	{
		r *= rhs.r;
		g *= rhs.g;
		b *= rhs.b;
		a *= rhs.a;

		return *this;
	}

	Colour operator* (const Colour& rhs)
	{
		r *= rhs.r;
		g *= rhs.g;
		b *= rhs.b;
		a *= rhs.a;
		return *this;
	}

	Colour AverageColours(const Colour& rhs);
	Colour Clip();

	float r;
	float g;
	float b;
	float a;
	float gloss;
};

#endif //COLOUR_H